using OConf.NetCore.Extensions;
using Woker.Demo;

IHost host = Host.CreateDefaultBuilder(args)
    .PrepareInitConfig(opt1 =>
    {
        opt1.AddNameSpace("AAA").AddNameSpace("BBB").AddNameSpace("CCC").AddNameSpace("DDD");
    }).LoadingConfig()
    .ConfigureServices(services =>
    {
        services.AddHostedService<Worker>();

        IConfiguration configuration = services.BuildServiceProvider().GetService<IConfiguration>();
    })
    .Build();

await host.RunAsync();
